package com.sdut.examonline.exam.dto;

import com.sdut.examonline.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import java.util.List;

@Data
@ApiModel(value = "创建手动组卷题目请求", description = "创建手动组卷题目请求")
public class ExamQuestionSetManualAddRequest extends BaseDto {

    @NotNull(message = "考试ID不能为空")
    @ApiModelProperty(value = "考试ID", required = true)
    private Long examId;

    @ApiModelProperty(value = "试题列表", required = true)
    private List<ManualQuestionType> questions;

    @Data
    public static class ManualQuestionType {

        @NotNull(message = "所选题目不能为空")
        @ApiModelProperty(value = "试题ID", required = true)
        private Long questionId;

        @Positive(message = "试题分数必须大于0")
        @ApiModelProperty(value = "试题分数", required = true)
        private Integer score;

    }

}
